import fs from 'fs';
import path from 'path';
import querystring from 'querystring';

function edit(req,res){
    let {id}=req.query
    console.log(id)
    let filePath=path.join(__dirname,"../data/user.json")
    let list=JSON.parse(fs.readFileSync(filePath))
    
    console.log(list[id])
    res.send(list[id])
}
export {edit}